exports.construction = function (req, res) {


  db.query("select ir.ir_id,ir.ir_number,ir.ir_equipment_name,FROM_UNIXTIME(ir.ir_create_time,'%Y-%m-%d') as ir_date,m.m_id,m.m_name from dkp_manager.dkp_integral_record as ir,dkp_manager.dkp_member as m where ir.ir_mid = m.m_id and m_tid = "+req.query.teamId+" and ir_type = 1 order by ir.ir_create_time desc",function(rs){
        
    if(rs == 'ERROR'){
        console.log("数据查询失败");  
    }

    var resultData = {};

    //数据重新组建
    for(var i=0;i<rs.length;i++){

      if(resultData[rs[i].ir_date]==undefined){
         resultData[rs[i].ir_date] = [];
      }

      resultData[rs[i].ir_date].push(rs[i]);

    }


    Render.viewRender(req,res,'construction',{resultData:resultData})


  })



  

}